import { User } from "../models/user";

// 用户登录
const login = async (ctx: any) => {
  const { userName, password } = ctx.request.body;
  const user = await User
    .findOne({ userName, password });
  return user;
}
export default login;